home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / SLIcon.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.8 KB  |  108 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLIcon.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLICON_H
  11. #define SLICON_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef SLGRDEF_H
  18. #include "SLGrDef.h"
  19. #endif
  20.  
  21. #ifndef SLPTRECT_H
  22. #include "SLPtRect.h"
  23. #endif
  24.  
  25. #ifndef SLSTRMRW_H
  26. #include "SLStrmRW.h"
  27. #endif
  28.  
  29. //========================================================================================
  30. //    Forward Declarations
  31. //========================================================================================
  32.  
  33. class FW_OResourceFile;
  34. struct FW_SGraphicContext;
  35.  
  36. class FW_CPrivIconRep;
  37. typedef FW_CPrivIconRep* FW_HIcon;
  38.  
  39. //========================================================================================
  40. // Extern C Methods
  41. //========================================================================================
  42.  
  43. // Export or Import functions for CFM-68K [sfu]
  44.  
  45. #if defined(FW_ODFLIB_IMPORT)
  46. #pragma import on
  47. #elif defined(FW_ODFLIB)
  48. #pragma export on
  49. #endif
  50.  
  51.  
  52. FW_EXTERN_C_BEGIN
  53.  
  54. // Creation
  55.  
  56. FW_HIcon            SL_API    FW_PrivIcon_CreateFromPlatformIcon(
  57.                                 FW_PlatformIcon     hIcon,
  58.                                 FW_PlatformError*     error);
  59.  
  60. FW_HIcon            SL_API    FW_PrivIcon_CreateFromResource(
  61.                                 FW_OResourceFile*     resourceFile,
  62.                                 FW_ResourceID         resID,
  63.                                 short                 size,
  64.                                 FW_PlatformError*     error);
  65.  
  66. FW_HIcon            SL_API    FW_PrivIcon_Copy(FW_HIcon icon, FW_PlatformError* error);
  67.  
  68. // Reference counting
  69.  
  70. void                SL_API    FW_PrivIcon_Acquire(FW_HIcon icon);
  71. long                SL_API    FW_PrivIcon_GetRefCount(FW_HIcon icon);
  72. void                SL_API    FW_PrivIcon_Release(FW_HIcon icon);
  73.  
  74. // Comparison
  75.  
  76. FW_Boolean            SL_API    FW_PrivIcon_IsEqual(FW_HIcon icon, FW_HIcon icon2);
  77.  
  78. // Get, Set, Adopt and Orphan
  79.  
  80. FW_PlatformIcon        SL_API    FW_PrivIcon_GetPlatformIcon(FW_HIcon icon);
  81. FW_PlatformIcon        SL_API    FW_PrivIcon_OrphanPlatformIcon(FW_HIcon icon);
  82. FW_Boolean            SL_API    FW_PrivIcon_IsPlatformIconOrphan(FW_HIcon icon);
  83.  
  84. FW_PlatformError    SL_API    FW_PrivIcon_SetPlatformIcon(FW_HIcon icon, FW_PlatformIcon newIcon);
  85. FW_PlatformError    SL_API    FW_PrivIcon_AdoptPlatformIcon(FW_HIcon icon, FW_PlatformIcon newIcon);
  86.     
  87. // Size
  88.  
  89. void                SL_API    FW_PrivIcon_GetIconSize(FW_HIcon icon, FW_SPoint& size);
  90. void                SL_API    FW_PrivIcon_GetIconSizeGC(Environment* ev, FW_HIcon icon, FW_SGraphicContext& gc, FW_SPoint& size);
  91.  
  92. // Streaming
  93.  
  94. FW_HIcon            SL_API    FW_PrivIcon_Read(FW_HReadableStream stream, FW_PlatformError* error);
  95. void                SL_API    FW_PrivIcon_Write(FW_HIcon icon, FW_HWritableStream stream, FW_PlatformError* error);
  96.  
  97. FW_EXTERN_C_END
  98.  
  99. // For CFM-68K [sfu]
  100.  
  101. #if defined(FW_ODFLIB_IMPORT)
  102. #pragma import off
  103. #elif defined(FW_ODFLIB)
  104. #pragma export off
  105. #endif
  106.  
  107. #endif // SLICON_H
  108.